Current File : //usr/lib/python3/dist-packages/boto3/__pycache__/session.cpython-312.pyc |
�
��eQ � �x � d dl Z d dlZd dlZd dlmZ d dlmZmZ d dl Z d dl
Z d dlmZm
Z
ddlmZ G d� d� Zy) � N)�Config)�DataNotFoundError�UnknownServiceError)�ResourceNotExistsError�UnknownAPIVersionError� )�ResourceFactoryc �� � e Zd ZdZ dd�Zd� Zed� � Zed� � Zed� � Z ed� � Z
d � Zd
� Zd� Z
d� Z dd
�Zd� Zd� Z dd�Z dd�Zd� Zy)�Sessiona/
A session stores configuration state and allows you to create service
clients and resources.
:type aws_access_key_id: string
:param aws_access_key_id: AWS access key ID
:type aws_secret_access_key: string
:param aws_secret_access_key: AWS secret access key
:type aws_session_token: string
:param aws_session_token: AWS temporary session token
:type region_name: string
:param region_name: Default region when creating new connections
:type botocore_session: botocore.session.Session
:param botocore_session: Use this Botocore session instead of creating
a new default one.
:type profile_name: string
:param profile_name: The name of a profile to use. If not given, then
the default profile is used.
Nc � � |�|| _ n#t j j � | _ | j j dk( r�dj | j j � }| j j r#| j xj d|z z
c_ n|| j _ d| j _ t j | j _ |�| j j d|� |s|s|r| j j |||� |�| j j d|� t | j j d� � | _ | j � | j! � y )N�BotocorezBotocore/{}� �Boto3�profile�region�
event_emitter)�_session�botocore�session�get_session�user_agent_name�format�user_agent_version�user_agent_extra�boto3�__version__�set_config_variable�set_credentialsr �
get_component�resource_factory�
_setup_loader�_register_default_handlers)�self�aws_access_key_id�aws_secret_access_key�aws_session_token�region_name�botocore_session�profile_name�
botocore_infos �//usr/lib/python3/dist-packages/boto3/session.py�__init__zSession.__init__1 s@ � � �'�,�D�M� %�,�,�8�8�:�D�M� �=�=�(�(�J�6�)�0�0��
�
�0�0��M� �}�}�-�-��
�
�.�.�#�
�2E�E�.�1>��
�
�.�,3�D�M�M�)�/4�/@�/@�D�M�M�,��#��M�M�-�-�i��F�� 5�9J��M�M�)�)�!�#8�:K�
� �"��M�M�-�-�h��D� /��M�M�'�'��8�!
���
�����'�'�)� c � � dj | j j t | j j d� � � S )Nz{}(region_name={})r )r � __class__�__name__�reprr �get_config_variable�r# s r+ �__repr__zSession.__repr__] s9 � �#�*�*��N�N�#�#�����2�2�8�<�=�
�
r- c �6 � | j j xs dS )z1
The **read-only** profile name.
�default)r r r3 s r+ r) zSession.profile_namec s � �
�}�}�$�$�1� �1r- c �8 � | j j d� S )z0
The **read-only** region name.
r )r r2 r3 s r+ r'